﻿<!DOCTYPE html>
<html lang="en">
<#include "../include/resource-head.ftl"/>
<#assign active='siteAdd'/>
<style>
    .label{
        font-size: 24px;
        height: auto;
    }
</style>
<body>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="col-xs-12">
                    <div class="row-fluid">
                        <div class="widget-box">
                            <div class="widget-header widget-header-blue widget-header-flat">
                                <h4 class="lighter">
                                    <i class="icon-plus"></i>用户充值
                                </h4>
                            </div>
                            <div class="widget-body">
                                <div class="widget-main">
                                    <div class="step-content row-fluid position-relative">
                                        <div class="alert alert-success" role="alert">充值${type!}</div>
                                        <form class="form-horizontal" action="/recharge/add" method="post"
                                              onsubmit="return confirm('确定支付吗？')">
                                            <input type="hidden" name="type" value="${type!}">
                                        <#if type == '话费'>
                                            <div class="form-group has-info">
                                                <label class="col-sm-2 control-label no-padding-right">充值金额</label>
                                                <div class="col-sm-5">

                                                    <span class="label label-default" data-value="10">10元</span>
                                                    <span class="label label-default" data-value="30">30元</span>
                                                    <span class="label label-success" data-value="50">50元</span>
                                                    <span class="label label-default" data-value="100">100元</span>
                                                    <span class="label label-default" data-value="200">200元</span>
                                                    <span class="label label-default" data-value="500">500元</span>
                                                </div>
                                                <div class="col-sm-2 input-group">
                                                    <input type="text" class="form-control" name="account" required id="account"
                                                           placeholder="例:100" value="50" />
                                                    <span class="input-group-addon">M</span>
                                                </div>
                                            </div>
                                        <#else>
                                            <div class="form-group has-info">
                                                <label class="col-sm-2 control-label no-padding-right">充值流量</label>
                                                <div class="col-sm-5">
                                                    <span class="label label-default" data-value="300">300M</span>
                                                    <span class="label label-success" data-value="1024">1G</span>
                                                    <span class="label label-default" data-value="2048">2G</span>
                                                    <span class="label label-default" data-value="3072">3G</span>
                                                    <span class="label label-default" data-value="10240">10G</span>
                                                    <span class="label label-default" data-value="15360">15G</span>
                                                    <span class="label label-default" data-value="30720">30G</span>
                                                </div>
                                                <div class="col-sm-2 input-group">
                                                    <input type="text" class="form-control" name="account" required id="account" value="1024"
                                                           placeholder="例:100"/>
                                                    <span class="input-group-addon">M</span>
                                                </div>
                                            </div>
                                        </#if>

                                            <hr/>
                                            <div class="row-fluid wizard-actions">
                                                <button class="btn btn-info" type="button"
                                                        onclick="javascript:history.go(-1)">返回
                                                </button>
                                                <button class="btn" type="reset">重置</button>
                                                <button class="btn btn-success" type="submit">提交</button>
                                            </div>

                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div><!-- /.page-content -->
    </div><!-- /.main-content -->
</div><!-- /.main-container -->
</body>
<#include "../include/resource-script.ftl"/>
<script>
    $(".label").click(function (){
        $(".label").removeClass("label-success");
        $(this).addClass("label-success");
        $("#account").val($(this).data("value"));
    });
</script>
</html>

